﻿(function (doc, win) {
    var docEl = doc.documentElement,
        resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
        recalc = function () {
            var clientWidth = docEl.clientWidth;
            if (!clientWidth) return;
            docEl.style.fontSize = 288 * (clientWidth / 1080) + 'px';
            if(clientWidth>1080){
                docEl.style.fontSize = 288 + 'px';
            }
        };
    if (!doc.addEventListener) return;
    win.addEventListener(resizeEvt, recalc, false);
    doc.addEventListener('DOMContentLoaded', recalc, false);
})(document, window);

function GetQueryString(name){
     var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");   
     var r = window.location.search.substr(1).match(reg);   
     if (r != null) return decodeURI(r[2]); return null;   
}

// 添加请求拦截器
axios.interceptors.request.use(function(config){
    config.headers.common['Authorization'] = GetQueryString("token");
return config;
},function(error){
    return Promise.reject(error);
});























